Hi all,
I've got a touch plate I'm using for Z height probing, and am having some difficulty understanding how to execute relative movements in KMotionCNC to use this effectively.
What I would like to do is this:
- Jog Z axis down slowly until the input is high
- Once input is high, set the KMotionCNC DRO (relative or G54) to the probe height (47.5mm)
- Move Z axis up some arbitrary amount so I can retrieve the probe
I have this code working, albeit it does not set the DRO height or move the Z axis positive.
------------------------------
#include "KMotionDef.h"
//probing routine for DT-02 touch probe
main()
{
EnableAxis(2);
Jog(2,-2000); // jog Z axis slowly negative
while (!ReadBit(1031)) ; // loop until IO bit goes high
Jog(2,0); // stop
while (!CheckDone(2)) ; // loop until motion completes
DisableAxis(2); // disable the axis
// insert Z offset code here
EnableAxis(2);
// insert relative move here
}
----------------------------------
Some help filling these blanks would help.
Thanks,
Lindsay